"""abrisco/rules_helm"""

module(
    name = "rules_helm",
    version = "0.15.0",
    compatibility_level = 1,
)

bazel_dep(name = "platforms", version = "1.0.0")
bazel_dep(name = "bazel_skylib", version = "1.8.1")
bazel_dep(name = "rules_go", version = "0.56.1", repo_name = "io_bazel_rules_go")
bazel_dep(name = "gazelle", version = "0.45.0", repo_name = "bazel_gazelle")

# `aspect_bazel_lib` is unfortunately required by `rules_oci`.
# https://github.com/bazel-contrib/rules_oci/issues/575
bazel_dep(name = "aspect_bazel_lib", version = "2.20.0", dev_dependency = True)
bazel_dep(name = "rules_oci", version = "2.2.6", dev_dependency = True)
bazel_dep(name = "stardoc", version = "0.8.0", dev_dependency = True, repo_name = "io_bazel_stardoc")
bazel_dep(name = "rules_rust_mdbook", version = "0.63.0", dev_dependency = True)
bazel_dep(name = "rules_shell", version = "0.5.1", dev_dependency = True)

go_sdk = use_extension("@io_bazel_rules_go//go:extensions.bzl", "go_sdk")
go_sdk.download(version = "1.23.0")

go_deps = use_extension("@bazel_gazelle//:extensions.bzl", "go_deps")
go_deps.from_file(go_mod = "//:go.mod")
use_repo(
    go_deps,
    "in_gopkg_yaml_v3",
)

helm = use_extension("@rules_helm//helm:extensions.bzl", "helm")
use_repo(
    helm,
    "helm",
    "helm_darwin_amd64_toolchain",
    "helm_darwin_arm64_toolchain",
    "helm_linux_amd64_toolchain",
    "helm_linux_arm64_toolchain",
    "helm_windows_amd64_toolchain",
)

register_toolchains(
    "@helm_darwin_amd64_toolchain//:toolchain",
    "@helm_darwin_arm64_toolchain//:toolchain",
    "@helm_linux_amd64_toolchain//:toolchain",
    "@helm_linux_arm64_toolchain//:toolchain",
    "@helm_windows_amd64_toolchain//:toolchain",
)

helm_test = use_extension("@rules_helm//tests:test_extensions.bzl", "helm_test", dev_dependency = True)
use_repo(
    helm_test,
    "helm_cm_push_linux",
    "helm_cm_push_macos",
    "helm_cm_push_windows",
    "helm_test_deps__with_chart_deps_grafana",
    "helm_test_deps__with_chart_deps_postgresql",
    "helm_test_deps__with_chart_deps_redis",
    "rules_helm_test_container_base",
)
